package main.java.design.strategy;

/**
 * <p></p>
 *
 * @author : wangdejian
 * @version 1.0
 * @date : 2020/6/17 21:44
 */
public class CashReturn implements ICashSuper {

    // 满300减40活动.
    @Override
    public double acceptCash(double money) {
        if (money / 300 >= 1) {
            double v = Math.floor(money / 300);
            return money - v * 40;
        }
        return money;
    }
}
